unit UJudgementCashier;

interface
  uses DB, ADODB;
type

  TJudgementCashier = class
    private
      FFlag:Boolean;
      UserName,UserPassword:string;
      procedure JudgementCashier;
    public
      constructor Create(Name,Password:string);
      property outFlage:Boolean read FFlag;
    end;
implementation
uses DataModule;
{ TJudgementCashier }



constructor TJudgementCashier.Create(Name, Password: string);
begin
  UserName:=Name;
  UserPassword:=Password;
  JudgementCashier;
end;

procedure TJudgementCashier.JudgementCashier;
var
  i:integer;
  qryCashier:TADOQuery;
begin
  FFlag:=false;
  qryCashier:=TADOQuery.Create(nil);
  qryCashier.Connection:=DM.ADOConn;
  try
    qryCashier.Close;
    qryCashier.SQL.Clear;
    qryCashier.SQL.Text:='select * from TAB_S_Manager where '+
      'ManageName = '''+UserName+''' and ManagePassWord = '''
      +UserPassword+'''';
    qryCashier.Active :=true;
    if qryCashier.RecordCount > 0 then
      FFlag:=true;
  finally
    qryCashier.Free;
  end;
end;

end.
